package com.itheima.branch;

public class ifTest2 {
    public static void main(String[] args) {
            test1();
    }
    public static void test1() {
        boolean red = false;
        boolean yellow = true;
        boolean green = false;
        if (red) {
            System.out.println("红灯亮，停止");
        } else if (yellow) {
            System.out.println("黄灯亮，准备");
        } else if (green) {
            System.out.println("绿灯亮，开始");
        }
        else {
            System.out.println("灯故障");
        }
    }
}
